import request from '@/utils/request'
export function getProfileAPI() {
    return request({
      url: '/park/sys/role',
      method: 'GET'
    })
}
export const getTreeListApi = () => {
    return request({
        url:'/park/sys/permision/all/tree'
    })
}
export const getRoleDetailApi = (roleId) => {
    return request({
        url:`/park/sys/role/${roleId}`
    })
}
export const getRoleListApi = (roleId,params) => {
    return request({
        url:`/park/sys/roleUser/${roleId}`,
        params
    })
}
export function getRoleListAPI(params) {
    return request({
      url: '/park/sys/role',
      params
    })
  }
export const addRoleApi = (data) => {
    return request({
        url:'/park/sys/role',
        data,
        method:'post'
    })
}
export const updateRoleApi = (data) => {
    return request({
        url:'/park/sys/role',
        data,
        method:'put'
    })
}
export const delRoleApi = (id) => {
    return request({
        url:`/park/sys/role/${id}`
    })
}
/**
 * 获取员工列表
 * @param { page, pageSize} params
 * @returns
 */
export function getEmployeeListAPI(params) {
    return request({
      url: '/park/sys/user',
      params
    })
  }
  
  /**
   * 添加员工
   * @returns
   */
  export function createEmployeeAPI(data) {
    return request({
      url: `/park/sys/user`,
      method: 'POST',
      data
    })
  }
  
  /**
   * 删除员工
   * @returns
   */
  export function delEmployeeAPI(id) {
    return request({
      url: `/park/sys/user/${id}`,
      method: 'DELETE'
    })
  }
  